#include <stdio.h>
#include <string.h>
#define BUFFER_SIZE 100

int main()
{

    char buffer[BUFFER_SIZE];
    printf("请输入一个字符串buffer：");
    scanf("%s", buffer);
    printf("buffer:%s\n",buffer);
    int len = strlen(buffer);
    printf("len:%d\n", len);
    while(1)
    {
        for(int idx = 0; idx < len ; idx++)
        {
            if(buffer[idx] >= 'A' && buffer[idx] <= 'Z')
            {
                /* 大写变成小写 */
                buffer[idx] = buffer[idx] + 32;
            }
            else
            {
                /* 小写变成大写 */
                buffer[idx] = buffer[idx] - 32;
            }
        }
        break;
    }
    printf("buffer:%s\n",buffer);
    return 0;
}







